package cn.xopencode.oss.rpc.passport;

import cn.xopencode.common.framework.vo.CommonResult;
import cn.xopencode.oss.rpc.passport.vo.*;

/**
 * 登录服务
 */
public interface PassPortRpc {
    /**
     *手机号、用户密码登录
     * @param loginByMobileVO
     * @param ip
     * @return
     */
    CommonResult<PassportAccessTokenRespVO> loginByMobile(PassportLoginByMobileReqVO loginByMobileVO, String ip);

    /**
     *用户名、用户密码登录
     * @param loginByUseNameVO
     * @param ip
     * @return
     */
    CommonResult<PassportAccessTokenRespVO> loginByUserName(PassportLoginByUserNameReqVO loginByUseNameVO, String ip);

    /**
     *手机号、短信验证码登录
     * @param loginBySmsVO
     * @param ip
     * @return
     */
    CommonResult<PassportAccessTokenRespVO> loginBySms(PassportLoginBySmsReqVO loginBySmsVO, String ip);

    /**
     *发送手机短信验证码
     * @param sendSmsCodeVO
     * @param ip
     * @return
     */
    CommonResult<Boolean> sendSmsCode(PassportSendSmsRespVO sendSmsCodeVO, String ip);

    /**
     *获取登录用户的Token
     * @param refreshToken
     * @param ip
     * @return
     */
    CommonResult<PassportAccessTokenRespVO> refreshToken(String refreshToken, String ip);
}
